package start;

import org.hibernate.Session;

import org.hibernate.Transaction;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class ADAOImpHibernate extends HibernateDaoSupport implements ADAO {
    public ADAOImpHibernate() {
        super();
    }

    @Override
    public void test() {
        System.out.println(this.getHibernateTemplate());
        A a = new A();
        a.setId(101);
        a.setName("SSS");
        this.getSessionFactory().openSession().save(a);
        
        /*Session session = getSessionFactory().openSession();
        Transaction transaction = session.beginTransaction();
        session.save(a);
        transaction.rollback();
        //transaction.commit();*/
    }

    @Override
    public void test2() {
    }
}
